<template>
	<view>
		<view class="list_box">
			<view class="list">
				<view class="list_top">
					<text class="SN">SN号：{{SN}}</text>
					<view class="copy">
						<text @click.stop="copy(SN)">复制</text>
					</view>
				</view>
				<text class="type">机具类型：{{data.product}}</text>
				<text class="type">机具单价：{{data.price}}</text>
				<text v-if="data.merchant_id != null && data.merchant_id != ''" class="type">商户编号：{{data.merchant_id}}</text>
				<text v-if="data.merchant_name != null && data.merchant_name != ''" class="type">商户名称：{{data.merchant_name}}</text>
				<view class="Modal">
					<text class="">终端归属：{{data.agent_name}}-[{{data.agent_phone}}]</text>
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				current: 0,
				id: null,
				SN: null,
				data: {},
				main_info: {}
			}
		},
		onLoad(e) {
			this.id = e.id
			this.SN = e.sn
			this._other()
		},
		methods: {
			// 复制终端号
			copy(sn) {
				uni.setClipboardData({
					data: sn,
					success: function() {}
				});
			},
			// 页面数据展示
			async _other() {
				uni.showLoading({
					title: '加载中'
				});
				const {
					data: res
				} = await this.$myHttp({
					url: 'v1/getHzyEquipInfo',
					data: {
						id: this.id
					}
				});
				uni.hideLoading()
				if (res.code == 200) {
					this.data = res.data
				}
			},
		}
	}
</script>

<style lang="scss" scoped>
	page {
		background-color: #F2F6FC;
	}
	.slot-icon {
		width: 21px;
		height: 21px;
		background-color: #1296db;
		border-radius: 100px;
		font-size: 12px;
		color: #fff;
		line-height: 21px;
		text-align: center;
	}

	.list_box {
		padding: 10rpx;
		box-sizing: border-box;

		.list {
			border-radius: 15rpx;
			margin: 15rpx;
			box-sizing: border-box;
			background-color: #fff;
			padding: 30rpx 20rpx;

			.list_top {
				display: flex;
				justify-content: space-between;
				align-items: center;
				margin-bottom: 30rpx;

				.copy {
					display: flex;
					align-items: center;

					text {
						padding: 10rpx 35rpx;
						font-size: 24rpx;
						border: #1296db solid 1px;
						border-radius: 100rpx;
						margin-right: 15rpx;
						color: #1296db;
					}
				}

				.SN {
					font-size: 32rpx;
					color: #333;
				}
			}

			.type {
				display: block;
				font-size: 28rpx;
				padding: 10rpx 0 30rpx 0;
			}

			.screen_list {
				display: flex;
				flex-wrap: wrap;
				margin-bottom: 30rpx;

				text {
					background-color: #f6f6f6;
					color: #333;
					font-size: 24rpx;
					padding: 15rpx;
					// width: 25%;
					text-align: center;
					margin-right: 15rpx;
				}
			}

			.Modal {
				padding: 20rpx 0 0 0;
				font-size: 28rpx;
				border-top: #f6f6f6 1px solid;
				display: block;
				display: flex;
				justify-content: space-between;
			}
		}

		.Modal_popup {
			border-bottom: #f6f6f6 1px solid;
			border-top: #f6f6f6 1px solid;
			width: 100%;
			padding: 20rpx 0;

			.popup_copy {
				padding: 10rpx 35rpx;
				font-size: 24rpx;
				border: #1296db solid 1px;
				border-radius: 50rpx;
				color: #1296db;
			}

			.popup_tit {
				font-size: 24rpx;
				padding-top: 15rpx;
				margin-right: 20rpx;
				box-sizing: border-box;
			}
		}

	}

	.derail_box {
		.rate_tit {
			width: 100%;
			color: #1296db;
			font-size: 28rpx;
			font-weight: 600;
		}

		.derail_list {
			display: flex;
			padding-top: 30rpx;

			view {
				display: flex;
				flex-direction: column;
				align-items: center;
				flex: 1;
			}

			.rate {
				font-size: 28rpx;
				color: #333;
			}

			.rate_cont {
				font-size: 24rpx;
				color: #999;
			}
		}
	}
</style>